package com.usian.mapper;


import com.usian.pojo.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

@Mapper
public interface GoodMapper extends BaseMapper<Goods> {

    @Select("SELECT * FROM goods WHERE shenhe = '3'")
    List<Goods> findList();

    @Select("SELECT * FROM goods WHERE shenhe in (0,1,2)")
    List<Goods> findAll();

    @Select("SELECT * FROM goods WHERE shenhe = '0'")
    List<Integer> findRelease();

    @Update("update goods set shenhe = '0' where id = #{id}")
    void shen(Integer id);
}
